(function(){BX.namespace("BX.Main.Mail");if(BX.Main.Mail.Unsubscriber){return}function t(t){}t.prototype.init=function(t){this.context=BX(t.containerId);this.spamBlock=this.context.querySelector('[data-role="spam-block"]');this.unsubBlock=this.context.querySelector('[data-role="unsub-block"]');this.spamBlockButton=this.context.querySelector('[data-role="spam-block-btn"]');this.unsubBlockButton=this.context.querySelector('[data-role="unsub-block-btn"]');BX.bind(this.spamBlockButton,"click",this.showBlock.bind(this,true));BX.bind(this.unsubBlockButton,"click",this.showBlock.bind(this,false))};t.prototype.showBlock=function(t){var s="main-mail-unsubscribe-spam-visible";if(t){BX.addClass(this.spamBlock,s);BX.addClass(this.unsubBlock,s)}else{BX.removeClass(this.spamBlock,s);BX.removeClass(this.unsubBlock,s)}};BX.Main.Mail.Unsubscriber=new t})(window);